import req from "@/http"
import { ResquestPaginationType } from './ResquestPaginationType'
import { ResponseBase } from './ResponseBase'


export const getVideoDetail = async (videoId: string) => {
  const { res, err, isSuccess } = await req({
    method: "get",
    url: `/v2/detail/${videoId}`,
    // params: query
  })
  return isSuccess ? res : err
}



export const getVideoByKeyword = async (keyword: string) => {
  const { res, err, isSuccess } = await req({
    method: "get",
    url: "/v2/search",
    params: {
      query: keyword,
      page: 1
    }
  })
  return isSuccess ? res : err
}
